package com.my12306.user.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.my12306.common.model.vo.PageVo;
import com.my12306.user.model.po.PUserEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 用户表
 *
 * @Author:苏牧夕
 * @Date:2020-05-15 17:36:13
 * @Version 1.0
 */
@Mapper
public interface PUserDao extends BaseMapper<PUserEntity> {

    PUserEntity queryUserById(@Param("id") Long id, @Param("logicDelete") Integer logicDelete);

    /**
     * 根据用户名查找用户
     *
     * @param userName
     * @param logicDelete
     * @return
     */
    PUserEntity queryUserByUserName(@Param("userName") String userName, @Param("logicDelete") Integer logicDelete);

    /**
     * 分页查询用户
     *
     * @param pageVo
     * @return
     */
    List<PUserEntity> queryUserListPage(@Param("pageVo") PageVo pageVo);
}
